<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目编号">
              <a-input placeholder="请输入项目编号" v-model="queryParam.code"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目简称">
              <a-input placeholder="请输入项目简称" v-model="queryParam.shortName"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="项目经理">
              <a-input placeholder="请输入项目经理" v-model="queryParam.charger"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys, onChange: onSelectChange, type: multiple ? 'checkbox':'radio'}"
        class="j-table-force-nowrap"
        @change="handleTableChange">

      </a-table>
    </div>

  </a-card>
</template>

<script>

  import '@/assets/less/TableExpand.less'
  import { mixinDevice } from '@/utils/mixin'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import { getAction } from '@/api/manage'

  export default {
    name: 'HfPmProjectSelectList',
    mixins:[JeecgListMixin, mixinDevice],
    props: {
      multiple:{
        type: Boolean,
        default: false
      }
    },
    data () {
      return {
        description: '项目管理管理页面',
        // 表头
        columns: [
          {
            title: '序号',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'项目编号',
            align:"center",
            dataIndex: 'code',
            scopedSlots: { customRender: 'custShortName' }
          },
          {
            title:'客户简称',
            align:"center",
            dataIndex: 'custShortName',

          },
          {
            title:'项目名称',
            align:"center",
            dataIndex: 'name'
          },
          {
            title:'项目简称',
            align:"center",
            dataIndex: 'shortName'
          },
          {
            title:'项目经理',
            align:"center",
            dataIndex: 'charger'
          },
          {
            title:'项目分类',
            align:"center",
            dataIndex: 'type_dictText'
          },
          {
            title:'完工比例',
            align:"center",
            dataIndex: 'actualPersonDay',
            scopedSlots: { customRender: 'actualPersonDay' }
          }
        ],
        url: {
          list: "/pm/pmProject/list"

        },
        dictOptions:{},
        superFieldList:[],
      }
    },
    methods: {
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less';
</style>